<?php 
  //$categories = get_categories_by_parent_id($category_id);
  if ($categories) {
?>
<ul id="categories">
<?php foreach ($categories as $category) {?>
  <li><a href="<?php echo url('?module=category&category_id=' . $category['id']);?>"><?php echo $category['name'];?></a></li>
<?php }?>
</ul>
<?php
  }
?>